package com.education.welco.service.impl;


import com.education.common.utils.Convert;
import com.education.welco.mapper.LLabelMapper;
import com.education.welco.pojo.LLabel;
import com.education.welco.service.ILLabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.awt.*;
import java.util.List;

/**
 * 标签字典 服务层实现
 *
 * @author d
 * @date 2020-05-08
 */
@Service
public class LLabelServiceImpl implements ILLabelService {

    @Autowired
    private LLabelMapper lLabelMapper;

    @Override
    public List<Label> selectLLabelByCatalogId(Integer catalogId) {
        return lLabelMapper.selectLLabelByCatalogId(catalogId);
    }

    /**
     * 查询标签字典信息
     *
     * @param list 标签字典
     * @return 标签字典信息
     */
    @Override
    public List<LLabel> selectLLabelByIdList(List<Integer> list) {
        return lLabelMapper.selectLLabelByIdList(list);
    }

    /**
     * 查询标签字典信息
     *
     * @param id 标签字典ID
     * @return 标签字典信息
     */
    @Override
    public LLabel selectLLabelById(Integer id) {
        return lLabelMapper.selectLLabelById(id);
    }

    /**
     * 查询标签字典列表
     *
     * @param lLabel 标签字典信息
     * @return 标签字典集合
     */
    @Override
    public List<LLabel> selectLLabelList(LLabel lLabel) {
        return lLabelMapper.selectLLabelList(lLabel);
    }

    /**
     * 新增标签字典
     *
     * @param lLabel 标签字典信息
     * @return 结果
     */
    @Override
    public int insertLLabel(LLabel lLabel) {
        return lLabelMapper.insertLLabel(lLabel);
    }

    /**
     * 删除标签字典信息
     *
     * @param id 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLLabelById(Integer id) {
        return lLabelMapper.deleteLLabelById(id);
    }

    /**
     * 修改标签字典
     *
     * @param lLabel 标签字典信息
     * @return 结果
     */
    @Override
    public int updateLLabel(LLabel lLabel) {
        return lLabelMapper.updateLLabel(lLabel);
    }

    /**
     * 删除标签字典对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLLabelByIds(String ids) {
        return lLabelMapper.deleteLLabelByIds(Convert.toStrArray(ids));
    }
}